package com.chengfei.thread;

import com.chengfei.thread.sync.Demo2;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @author chengfei5
 * @date 2019/1/7
 */
public class Main {
    public static void main(String[] args) {
        ExecutorService executorService = Executors.newFixedThreadPool(20);
        for(int i = 0;i<20;i++){
            executorService.execute(() -> System.out.println(Demo2.getInstance()));
        }
        executorService.shutdown();
    }
}
